﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TO4ValueType
{
    class Program
    {
        struct Book
        {
            public int page;
            public double price;
        }
        //枚举
        enum FontType
        {
            Normal=10,
            Bold,
            Itaic
        }
        static void Main(string[] args)
        {
            Console.WriteLine("值类型展示");
            //
            int a = 10;
            long b = 10L;
            short c=10;
            Console.WriteLine(a.GetType());
            Console.WriteLine(b.GetType());
            Console.WriteLine(c.GetType());
            //实数
            float d = 1.0F;
            double e = 1.0;
            decimal f = 1.0M;
            Console.WriteLine(d.GetType());
            Console.WriteLine(e.GetType());
            Console.WriteLine(f.GetType());
            //字符
            char g = '中';
            Console.WriteLine(g.GetType());
            //布尔
            bool h = true;
            Console.WriteLine(h.GetType());
            //结构体
            Book book = new Book() { page = 20, price = 40.0 };
            Console.WriteLine("页码{0}，价格{1}",book.page,book.price);
            //枚举
            FontType ft = FontType.Itaic;
            Console.WriteLine(ft);
            ft++;
            Console.WriteLine(ft);
            //等待输入
            Console.ReadKey();


        }
    }
}
